home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Turnbull China Bikeride
/
Turnbull China Bikeride - Disc 2.iso
/
STUTTGART
/
EDITORS
/
MEMACS
/
H
/
Evar
< prev
next >
Wrap
Text File
|
1990-06-26
|
9KB
|
283 lines
/* EVAR.H: Environment and user variable definitions
for MicroEMACS
written 1986 by Daniel Lawrence
*/
/* structure to hold user variables and their definitions */
typedef struct UVAR {
char u_name[NVSIZE + 1]; /* name of user variable */
char *u_value; /* value (string) */
} UVAR;
/* current user variables (This structure will probably change) */
#define MAXVARS 512
UVAR NOSHARE uv[MAXVARS + 1]; /* user variables */
/* list of recognized environment variables */
NOSHARE char *envars[] = {
"acount", /* # of chars until next auto-save */
"asave", /* # of chars between auto-saves */
"bufhook", /* enter buffer switch hook */
"cbflags", /* current buffer flags */
"cbufname", /* current buffer name */
"cfname", /* current file name */
"cftype", /* current file type */
"cmdhook", /* command loop hook */
"cmode", /* mode of current buffer */
"curchar", /* current character under the cursor */
"curcol", /* current column pos of cursor */
"curline", /* current line in file */
"curwidth", /* current screen width */
"curwind", /* current window ordinal on current screen */
"cwline", /* current screen line in window */
"debug", /* macro debugging */
"diagflag", /* diagonal mouse movements enabled? */
"discmd", /* display commands on command line */
"disinp", /* display command line input characters */
"disphigh", /* display high bit characters escaped */
"exbhook", /* exit buffer switch hook */
"fcol", /* first displayed column in curent window */
"fillcol", /* current fill column */
"flicker", /* flicker supression */
"gflags", /* global internal emacs flags */
"gmode", /* global modes */
"hardtab", /* current hard tab size */
"hjump", /* horizontal screen jump size */
"hscroll", /* horizontal scrolling flag */
"kill", /* kill buffer (read only) */
"language", /* language of text messages */
"lastkey", /* last keyboard char struck */
"lastmesg", /* last string mlwrite()ed */
"line", /* text of current line */
"lterm", /* current line terminator for writes */
"lwidth", /* width of current line */
"match", /* last matched magic pattern */
"modeflag", /* Modelines displayed flag */
"msflag", /* activate mouse? */
"numwind", /* number of windows on current screen */
"oldcrypt", /* use old(broken) encryption */
"pagelen", /* number of lines used by editor */
"palette", /* current palette string */
"pending", /* type ahead pending flag */
"popflag", /* pop-up windows active? */
"progname", /* returns current prog name - "MicroEMACS" */
"ram", /* ram in use by malloc */
"readhook", /* read file execution hook */
"region", /* current region (read only) */
"replace", /* replacement pattern */
"rval", /* child process return value */
"scrname", /* current screen name */
"scrnum", /* current screen number in list */
"search", /* search pattern */
"searchpnt", /* differing search styles (term point) */
"seed", /* current random number seed */
"softtab", /* current soft tab size */
"sres", /* current screen resolution */
"ssave", /* safe save flag */
"sscroll", /* smooth scrolling flag */
"status", /* returns the status of the last command */
"sterm", /* search terminator character */
"target", /* target for line moves */
"time", /* date and time */
"tpause", /* length to pause for paren matching */
"version", /* current version number */
"wchars", /* set of characters legal in words */
"wline", /* # of lines in current window */
"wraphook", /* wrap word execution hook */
"writehook", /* write file hook */
"xpos", /* current mouse X position */
"yankpnt", /* point placement at yanked/included text */
"ypos" /* current mouse Y position */
};
#define NEVARS sizeof(envars) / sizeof(char *)
/* and its preprocesor definitions */
#define EVACOUNT 0
#define EVASAVE 1
#define EVBUFHOOK 2
#define EVCBFLAGS 3
#define EVCBUFNAME 4
#define EVCFNAME 5
#define EVCFTYPE 6
#define EVCMDHK 7
#define EVCMODE 8
#define EVCURCHAR 9
#define EVCURCOL 10
#define EVCURLINE 11
#define EVCURWIDTH 12
#define EVCURWIND 13
#define EVCWLINE 14
#define EVDEBUG 15
#define EVDIAGFLAG 16
#define EVDISCMD 17
#define EVDISINP 18
#define EVDISPHIGH 19
#define EVEXBHOOK 20
#define EVFCOL 21
#define EVFILLCOL 22
#define EVFLICKER 23
#define EVGFLAGS 24
#define EVGMODE 25
#define EVHARDTAB 26
#define EVHJUMP 27
#define EVHSCROLL 28
#define EVKILL 29
#define EVLANG 30
#define EVLASTKEY 31
#define EVLASTMESG 32
#define EVLINE 33
#define EVLTERM 34
#define EVLWIDTH 35
#define EVMATCH 36
#define EVMODEFLAG 37
#define EVMSFLAG 38
#define EVNUMWIND 39
#define EVOCRYPT 40
#define EVPAGELEN 41
#define EVPALETTE 42
#define EVPENDING 43
#define EVPOPFLAG 44
#define EVPROGNAME 45
#define EVRAM 46
#define EVREADHK 47
#define EVREGION 48
#define EVREPLACE 49
#define EVRVAL 50
#define EVSCRNAME 51
#define EVSCRNUM 52
#define EVSEARCH 53
#define EVSEARCHPNT 54
#define EVSEED 55
#define EVSOFTTAB 56
#define EVSRES 57
#define EVSSAVE 58
#define EVSSCROLL 59
#define EVSTATUS 60
#define EVSTERM 61
#define EVTARGET 62
#define EVTIME 63
#define EVTPAUSE 64
#define EVVERSION 65
#define EVWCHARS 66
#define EVWLINE 67
#define EVWRAPHK 68
#define EVWRITEHK 69
#define EVXPOS 70
#define EVYANKPNT 71
#define EVYPOS 72
/* list of recognized user functions */
typedef struct UFUNC {
char *f_name; /* name of function */
int f_type; /* 1 = monamic, 2 = dynamic */
} UFUNC;
#define NILNAMIC 0
#define MONAMIC 1
#define DYNAMIC 2
#define TRINAMIC 3
NOSHARE UFUNC funcs[] = {
"abs", MONAMIC, /* absolute value of a number */
"add", DYNAMIC, /* add two numbers together */
"and", DYNAMIC, /* logical and */
"asc", MONAMIC, /* char to integer conversion */
"ban", DYNAMIC, /* bitwise and 9-10-87 jwm */
"bin", MONAMIC, /* loopup what function name is bound to a key */
"bno", MONAMIC, /* bitwise not */
"bor", DYNAMIC, /* bitwise or 9-10-87 jwm */
"bxo", DYNAMIC, /* bitwise xor 9-10-87 jwm */
"cat", DYNAMIC, /* concatinate string */
"chr", MONAMIC, /* integer to char conversion */
"div", DYNAMIC, /* division */
"env", MONAMIC, /* retrieve a system environment var */
"equ", DYNAMIC, /* logical equality check */
"exi", MONAMIC, /* check if a file exists */
"fin", MONAMIC, /* look for a file on the path... */
"gre", DYNAMIC, /* logical greater than */
"gtc", NILNAMIC, /* get 1 emacs command */
"gtk", NILNAMIC, /* get 1 charater */
"ind", MONAMIC, /* evaluate indirect value */
"isn", MONAMIC, /* is the arg a number? */
"lef", DYNAMIC, /* left string(string, len) */
"len", MONAMIC, /* string length */
"les", DYNAMIC, /* logical less than */
"low", MONAMIC, /* lower case string */
"mid", TRINAMIC, /* mid string(string, pos, len) */
"mod", DYNAMIC, /* mod */
"neg", MONAMIC, /* negate */
"not", MONAMIC, /* logical not */
"or", DYNAMIC, /* logical or */
"rig", DYNAMIC, /* right string(string, pos) */
"rnd", MONAMIC, /* get a random number */
"seq", DYNAMIC, /* string logical equality check */
"sgr", DYNAMIC, /* string logical greater than */
"sin", DYNAMIC, /* find the index of one string in another */
"sle", DYNAMIC, /* string logical less than */
"slo", DYNAMIC, /* set lower to upper char translation */
"sub", DYNAMIC, /* subtraction */
"sup", DYNAMIC, /* set upper to lower char translation */
"tim", DYNAMIC, /* multiplication */
"tri", MONAMIC, /* trim whitespace off the end of a string */
"tru", MONAMIC, /* Truth of the universe logical test */
"upp", MONAMIC, /* uppercase string */
"xla", TRINAMIC /* XLATE character string translation */
};
#define NFUNCS sizeof(funcs) / sizeof(UFUNC)
/* and its preprocesor definitions */
#define UFABS 0
#define UFADD 1
#define UFAND 2
#define UFASCII 3
#define UFBAND 4
#define UFBIND 5
#define UFBNOT 6
#define UFBOR 7
#define UFBXOR 8
#define UFCAT 9
#define UFCHR 10
#define UFDIV 11
#define UFENV 12
#define UFEQUAL 13
#define UFEXIST 14
#define UFFIND 15
#define UFGREATER 16
#define UFGTCMD 17
#define UFGTKEY 18
#define UFIND 19
#define UFISNUM 20
#define UFLEFT 21
#define UFLENGTH 22
#define UFLESS 23
#define UFLOWER 24
#define UFMID 25
#define UFMOD 26
#define UFNEG 27
#define UFNOT 28
#define UFOR 29
#define UFRIGHT 30
#define UFRND 31
#define UFSEQUAL 32
#define UFSGREAT 33
#define UFSINDEX 34
#define UFSLESS 35
#define UFSLOWER 36
#define UFSUB 37
#define UFSUPPER 38
#define UFTIMES 39
#define UFTRIM 40
#define UFTRUTH 41
#define UFUPPER 42
#define UFXLATE 43